package com.bw.home

import androidx.lifecycle.MutableLiveData

import com.bw.common.vm.BaseViewModel
import com.bw.home.entity.CementEntity
import com.bw.http.utils.zgr.OkHttpClientManager

class HomeViewModel:BaseViewModel() {
    private val apiService:ApiService = OkHttpClientManager.retrofitInstance.create(ApiService::class.java)

    val cementSuccess by lazy { MutableLiveData<List<CementEntity>>() }


    fun getCements(page: Int, size: Int) {
        executeNetwork(
            { apiService.getCements(page, size) },
            cementSuccess::postValue
        )
    }




}